package cn.wolfcode.plus.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.wolfcode.plus.domain.RedPacketRecord;
import cn.wolfcode.plus.service.RedPacketRecordService;
import cn.wolfcode.plus.mapper.RedPacketRecordMapper;
import org.springframework.stereotype.Service;

/**
 *
 */
@Service
public class RedPacketRecordServiceImpl extends ServiceImpl<RedPacketRecordMapper, RedPacketRecord>
    implements RedPacketRecordService{

    @Override
    public void save(Integer uid, Integer id, int randomMoney) {
        RedPacketRecord redPacketRecord=new RedPacketRecord();
        redPacketRecord.setUid(uid);
        redPacketRecord.setNickName("胡齐瑞");
        redPacketRecord.setImgUrl("https://img0.baidu.com/it/u=633148623,2196072495&fm=26&fmt=auto&gp=0.jpg");
        redPacketRecord.setRedPacketId(id.longValue());
        redPacketRecord.setAmount(randomMoney);

        getBaseMapper().insert(redPacketRecord);
    }
}




